<template>
    <view class="w-700 h-auto fl-ro-cen gap-40 my-30 bg-ffffff rd-10 overflow-hidden material-shadow" @click="on_click">
        <image class="w-100% h-150" :src="JSON.parse(props.paperItem.imagesUrl)[0]" mode="heightFix"></image>
        <wd-text :text="`免费${props.paperItem.name} 点击领取`" type="success" size="40rpx"></wd-text>
        <wd-text text=">>>" size="40rpx" type="success"></wd-text>
    </view>
</template>

<script setup>
    const props = defineProps({
        paperItem: {
            type: Object,
            default() {
                return {
                    id: null,
                    imagesUrl: '',
                    name: '',
                    price: null
                };
            }
        }
    });
    const emit = defineEmits(['handle_click']); //定义点击事件的名字
    const on_click = () => {
        //发射点击事件
        emit('handle_click', `点击了${props.paperItem.name}`);
    };
</script>

<style lang="scss"></style>
